import request from '@/axios'
import { RebutType } from './types'

export const getRebutListApi = (params: any) => {
  return request.get<RebutType[]>({ url: '/check/rebut', params })
}

export const getRebutOptionsApi = (params: any) => {
  return request.get({ url: '/check/rebut/options', params })
}

export const addRebutApi = (data: any) => {
  return request.post({ url: '/check/rebut', data })
}

export const putRebutApi = (data: any) => {
  return request.put({ url: `/check/rebut/${data.id}`, data })
}

export const deleteRebutApi = (ids: string[] | number[]) => {
  return request.delete({ url: '/check/rebut', data: ids })
}
